/**
 * 文件：BaseFragment.java
 * 包名：com.ronri.test;   --- 正式发布时需要修正
 * 说明：Fragment基类
 * 作者：MS During
 * 日期：2017/4/12
 * 历史：
 */

package com.ronri.ams;

import android.app.Activity;
import android.content.Context;
import android.support.v4.app.Fragment;

import com.cz.nongyetongv5.application.InitApplication;


public class BaseFragment extends Fragment {
    private Activity activity;

    public Context getContext(){
        if(activity == null){

            return InitApplication.getInstance();
        }

        return activity;
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        activity = getActivity();
    }
}
